<%
    set rs = server.CreateObject("ADODB.recordset")
    rs.Open "select * from daohang100_sites_type where id=4",conn
    textname=rs("typename")
    rs.Close
    set rs = Server.CreateObject("ADODB.recordset")
    sql = "select * from daohang100_sites_type where topmenu=4 order by pos "
    rs.Open sql,conn
    num = 0
%>
<div class="siteTitle">
    <%=textname %>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <%do until rs.EOF
    num = num+1 
    if (num mod 4)=1 then
    %>
    <tr>
        <td>
            <a href="<%=rs("link") %>" target="_blank">
                <%=rs("typename") %>
            </a>
        </td>
        <%elseif (num mod 4)=0 then %>
        <td>
            <a href="<%=rs("link") %>" target="_blank">
                <%=rs("typename") %>
            </a>
        </td>
    </tr>
    <%else %>
    <td>
        <a href="<%=rs("link") %>" target="_blank">
            <%=rs("typename") %>
        </a>
    </td>
    <%End if 
rs.movenext 
loop%>
</table>
<%rs.Close %>
